import 'dart:convert';

import 'package:enterprise_v6_app/app/components/custom_modele/custom_tree.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/process_directory_tree_entity.g.dart';

export 'package:enterprise_v6_app/generated/json/process_directory_tree_entity.g.dart';

@JsonSerializable()
class ProcessDirectoryTreeEntity implements TreeChoiceIface {
	ProcessDirectoryTreeEntity();

	factory ProcessDirectoryTreeEntity.fromJson(Map<String, dynamic> json) => $ProcessDirectoryTreeEntityFromJson(json);
	
  List<ProcessDirectoryTreeEntity>? children;
	String? companyCode;
	String? createBy;
	String? createById;
	String? createDate;
	String? deleted;
	String? id;
	int? level;
	String? name;
	String? parentId;
	String? path;
	String? updateBy;
	String? updateById;
	String? updateDate;

	Map<String, dynamic> toJson() => $ProcessDirectoryTreeEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
  
   @override
   bool expand = false;
  
   @override
   List<TreeChoiceIface> get treeChildren => children ?? [];
  
   @override
   String get treeId => id ?? '';
  
   @override
   String get treeName => name ?? '';
}
